module Base
{
	template vehicle TankMachinegun
	{
		part Browning_M2
		{
			itemType = Base.Browning_M2,
			mechanicRequireKey = true,
			category = Turrent,
			area = SeatFrontRight,
			mechanicArea = SeatFrontRight,
			repairMechanic = true,			
			parent = Turrent,

			anim Static
			{
				anim = Shooting,
				reverse = TRUE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = FALSE,
				loop = FALSE,
				rate = 1.0,
			}

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 10,
				conditionAffectsCapacity = false,
			}

			table install
			{
				time = 600,
				skills = Mechanics:1,
				test = Vehicles.InstallTest.Default,
				complete = Vehicles.InstallComplete.MACHINEGUN,
			}

			table uninstall
			{
				time = 600,
				skills = Mechanics:1,
				test = Vehicles.UninstallTest.MACHINEGUN,
				complete = Vehicles.UninstallComplete.Default,
			}

			lua
			{
				create = Vehicles.Create.MACHINEGUN,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}

		part MachinegunAmmoBox
		{
			category = nodisplay,

			anim Static
			{
				anim = Shooting,
				reverse = TRUE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = TRUE,
				loop = TRUE,
				rate = 1.0,
			}

			parent = Turrent,

			lua
			{
				create = Vehicles.Create.MACHINEGUN,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}

		part MachinegunAmmo
		{
			category = nodisplay,

			anim Static
			{
				anim = Shooting,
				reverse = TRUE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = TRUE,
				loop = TRUE,
				rate = 1.0,
			}

			parent = Turrent,

			lua
			{
				create = Vehicles.Create.MACHINEGUN,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}
		part Vulcan_M61
		{
			category = Turrent,
			area = SeatFrontRight,
			itemType = Base.M61_Vulcan,
			mechanicRequireKey = true,
			repairMechanic = true,
			parent = Turrent,

			model Default
			{
				file = M163_Cannon,
				offset = 0.0000 0.0000 -0.2700,
				rotate = 0.0000 0.0000 0.0000,
				scale = 1.0,
			}

			model Muzzle
			{
				file = M163_Muzzle,
				offset = 0.0000 0.0000 -0.2700,
				rotate = 0.0000 0.0000 0.0000,
				scale = 1.0,
			}

			anim Static
			{
				anim = Shooting,
				reverse = FALSE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = FALSE,
				loop = FALSE,
				rate = 1.5,
			}

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 100,
				conditionAffectsCapacity = false,
			}

			lua
			{
				create = Vehicles.Create.MACHINEGUNTANK,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}
		
		part M41_76mm
		{
			category = Turrent,
			area = SeatFrontRight,
			itemType = Base.M41_76mm,
			mechanicRequireKey = true,
			repairMechanic = true,
			parent = Turrent,

			model Default
			{
				file = M41_Cannon,
				offset = 0.0000 0.0000 0.2800,
				rotate = 0.0000 0.0000 0.0000,
				scale = 1.0,
			}

			model Muzzle
			{
				file = M41_Muzzle,
				offset = 0.0000 0.0000 0.2800,
				rotate = 0.0000 0.0000 0.0000,
				scale = 1.0,
			}

			anim Static
			{
				anim = Shooting,
				reverse = FALSE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = FALSE,
				loop = FALSE,
				rate = 1.5,
			}

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 5,
				conditionAffectsCapacity = false,
			}

			parent = Turrent,

			lua
			{
				create = Vehicles.Create.MACHINEGUNTANKM41,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}

		part M1919A4_Coax
		{
			
			mechanicRequireKey = true,
			category = Turrent,
			area = SeatFrontRight,
			itemType = Base.M1919A4_Coax,
			mechanicArea = SeatFrontRight,
			repairMechanic = true,			
			parent = Turrent,
			durability = 10,

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 5,
				conditionAffectsCapacity = false,
			}

			parent = Turrent,

			lua
			{
				create = Vehicles.Create.MACHINEGUNDefault,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}
		
		part Cannon30mm2A42
		{
			category = Turrent,
			area = SeatFrontRight,
			itemType = Base.M41_76mm,
			mechanicRequireKey = true,
			repairMechanic = true,
			parent = Turrent,

			model Default
			{
				file = BMP-2_Cannon,
				offset = 0.0000 0.0000 -0.2800,
				rotate = 0.0000 0.0000 0.0000,
				scale = 1.0,
			}

			model Muzzle
			{
				file = BMP-2_Muzzle,
				offset = 0.0000 0.0000 -0.2800,
				rotate = 0.0000 0.0000 0.0000,
				scale = 1.0,
			}

			anim Static
			{
				anim = Shooting,
				reverse = FALSE,
				animate = FALSE,
				rate = 0.001,
			}

			anim Shooting
			{
				anim = Shooting,
				reverse = FALSE,
				loop = FALSE,
				rate = 1.5,
			}

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 60,
				conditionAffectsCapacity = false,
			}

			parent = Turrent,

			lua
			{
				create = Vehicles.Create.MACHINEGUNTANK30mm2A42,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}
		
		part PKT_Coax
		{
			
			mechanicRequireKey = true,
			category = Turrent,
			area = SeatFrontRight,
			itemType = Base.M1919A4_Coax,
			mechanicArea = SeatFrontRight,
			repairMechanic = true,			
			parent = Turrent,
			durability = 10,

			container
			{
				test = Vehicles.ContainerAccess.AMMOSTOR,
				capacity = 5,
				conditionAffectsCapacity = false,
			}

			parent = Turrent,

			lua
			{
				create = Vehicles.Create.MACHINEGUNDefault,
				init = Vehicles.Init.MACHINEGUN,
				update = Vehicles.Update.MACHINEGUN,
			}
		}
		
		part AmmoStor
		{
			area = SeatGunner,
			itemType = Base.GloveBox,
			mechanicRequireKey = true,
			category = Turrent,
			
			container
			{
				conditionAffectsCapacity = false,
				capacity = 60,
				test = Vehicles.ContainerAccess.AmmoStor,
			}	
			lua
			{
				create = Vehicles.Create.Default,
			}			
		}
	}
	
	template vehicle Turrent
	{	
		part Turrent
		{
			category = Turrent,
			itemType = Base.TankTurret,
			repairMechanic = true,
			area = SeatFrontRight,
			mechanicArea = SeatFrontRight,
			mechanicRequireKey = true,
			durability = 10,
			
			anim 360
			{
				anim = Turrent_360,
				animate = TRUE,
			}

			anim 002
			{
				anim = Turrent_002,
				animate = FALSE,
			}

			anim 004
			{
				anim = Turrent_004,
				animate = FALSE,
			}

			anim 006
			{
				anim = Turrent_006,
				animate = FALSE,
			}

			anim 008
			{
				anim = Turrent_008,
				animate = FALSE,
			}

			anim 010
			{
				anim = Turrent_010,
				animate = FALSE,
			}

			anim 012
			{
				anim = Turrent_012,
				animate = FALSE,
			}

			anim 014
			{
				anim = Turrent_014,
				animate = FALSE,
			}

			anim 016
			{
				anim = Turrent_016,
				animate = FALSE,
			}

			anim 018
			{
				anim = Turrent_018,
				animate = FALSE,
			}

			anim 020
			{
				anim = Turrent_020,
				animate = FALSE,
			}

			anim 022
			{
				anim = Turrent_022,
				animate = FALSE,
			}

			anim 024
			{
				anim = Turrent_024,
				animate = FALSE,
			}

			anim 026
			{
				anim = Turrent_026,
				animate = FALSE,
			}

			anim 028
			{
				anim = Turrent_028,
				animate = FALSE,
			}

			anim 030
			{
				anim = Turrent_030,
				animate = FALSE,
			}

			anim 032
			{
				anim = Turrent_032,
				animate = FALSE,
			}

			anim 034
			{
				anim = Turrent_034,
				animate = FALSE,
			}

			anim 036
			{
				anim = Turrent_036,
				animate = FALSE,
			}

			anim 038
			{
				anim = Turrent_038,
				animate = FALSE,
			}

			anim 040
			{
				anim = Turrent_040,
				animate = FALSE,
			}

			anim 042
			{
				anim = Turrent_042,
				animate = FALSE,
			}

			anim 044
			{
				anim = Turrent_044,
				animate = FALSE,
			}

			anim 046
			{
				anim = Turrent_046,
				animate = FALSE,
			}

			anim 048
			{
				anim = Turrent_048,
				animate = FALSE,
			}

			anim 050
			{
				anim = Turrent_050,
				animate = FALSE,
			}

			anim 052
			{
				anim = Turrent_052,
				animate = FALSE,
			}

			anim 054
			{
				anim = Turrent_054,
				animate = FALSE,
			}

			anim 056
			{
				anim = Turrent_056,
				animate = FALSE,
			}

			anim 058
			{
				anim = Turrent_058,
				animate = FALSE,
			}

			anim 060
			{
				anim = Turrent_060,
				animate = FALSE,
			}

			anim 062
			{
				anim = Turrent_062,
				animate = FALSE,
			}

			anim 064
			{
				anim = Turrent_064,
				animate = FALSE,
			}

			anim 066
			{
				anim = Turrent_066,
				animate = FALSE,
			}

			anim 068
			{
				anim = Turrent_068,
				animate = FALSE,
			}

			anim 070
			{
				anim = Turrent_070,
				animate = FALSE,
			}

			anim 072
			{
				anim = Turrent_072,
				animate = FALSE,
			}

			anim 074
			{
				anim = Turrent_074,
				animate = FALSE,
			}

			anim 076
			{
				anim = Turrent_076,
				animate = FALSE,
			}

			anim 078
			{
				anim = Turrent_078,
				animate = FALSE,
			}

			anim 080
			{
				anim = Turrent_080,
				animate = FALSE,
			}

			anim 082
			{
				anim = Turrent_082,
				animate = FALSE,
			}

			anim 084
			{
				anim = Turrent_084,
				animate = FALSE,
			}

			anim 086
			{
				anim = Turrent_086,
				animate = FALSE,
			}

			anim 088
			{
				anim = Turrent_088,
				animate = FALSE,
			}

			anim 090
			{
				anim = Turrent_090,
				animate = FALSE,
			}

			anim 092
			{
				anim = Turrent_092,
				animate = FALSE,
			}

			anim 094
			{
				anim = Turrent_094,
				animate = FALSE,
			}

			anim 096
			{
				anim = Turrent_096,
				animate = FALSE,
			}

			anim 098
			{
				anim = Turrent_098,
				animate = FALSE,
			}

			anim 100
			{
				anim = Turrent_100,
				animate = FALSE,
			}

			anim 102
			{
				anim = Turrent_102,
				animate = FALSE,
			}

			anim 104
			{
				anim = Turrent_104,
				animate = FALSE,
			}

			anim 106
			{
				anim = Turrent_106,
				animate = FALSE,
			}

			anim 108
			{
				anim = Turrent_108,
				animate = FALSE,
			}

			anim 110
			{
				anim = Turrent_110,
				animate = FALSE,
			}

			anim 112
			{
				anim = Turrent_112,
				animate = FALSE,
			}

			anim 114
			{
				anim = Turrent_114,
				animate = FALSE,
			}

			anim 116
			{
				anim = Turrent_116,
				animate = FALSE,
			}

			anim 118
			{
				anim = Turrent_118,
				animate = FALSE,
			}

			anim 120
			{
				anim = Turrent_120,
				animate = FALSE,
			}

			anim 122
			{
				anim = Turrent_122,
				animate = FALSE,
			}

			anim 124
			{
				anim = Turrent_124,
				animate = FALSE,
			}

			anim 126
			{
				anim = Turrent_126,
				animate = FALSE,
			}

			anim 128
			{
				anim = Turrent_128,
				animate = FALSE,
			}

			anim 130
			{
				anim = Turrent_130,
				animate = FALSE,
			}

			anim 132
			{
				anim = Turrent_132,
				animate = FALSE,
			}

			anim 134
			{
				anim = Turrent_134,
				animate = FALSE,
			}

			anim 136
			{
				anim = Turrent_136,
				animate = FALSE,
			}

			anim 138
			{
				anim = Turrent_138,
				animate = FALSE,
			}

			anim 140
			{
				anim = Turrent_140,
				animate = FALSE,
			}

			anim 142
			{
				anim = Turrent_142,
				animate = FALSE,
			}

			anim 144
			{
				anim = Turrent_144,
				animate = FALSE,
			}

			anim 146
			{
				anim = Turrent_146,
				animate = FALSE,
			}

			anim 148
			{
				anim = Turrent_148,
				animate = FALSE,
			}

			anim 150
			{
				anim = Turrent_150,
				animate = FALSE,
			}

			anim 152
			{
				anim = Turrent_152,
				animate = FALSE,
			}

			anim 154
			{
				anim = Turrent_154,
				animate = FALSE,
			}

			anim 156
			{
				anim = Turrent_156,
				animate = FALSE,
			}

			anim 158
			{
				anim = Turrent_158,
				animate = FALSE,
			}

			anim 160
			{
				anim = Turrent_160,
				animate = FALSE,
			}

			anim 162
			{
				anim = Turrent_162,
				animate = FALSE,
			}

			anim 164
			{
				anim = Turrent_164,
				animate = FALSE,
			}

			anim 166
			{
				anim = Turrent_166,
				animate = FALSE,
			}

			anim 168
			{
				anim = Turrent_168,
				animate = FALSE,
			}

			anim 170
			{
				anim = Turrent_170,
				animate = FALSE,
			}

			anim 172
			{
				anim = Turrent_172,
				animate = FALSE,
			}

			anim 174
			{
				anim = Turrent_174,
				animate = FALSE,
			}

			anim 176
			{
				anim = Turrent_176,
				animate = FALSE,
			}

			anim 178
			{
				anim = Turrent_178,
				animate = FALSE,
			}

			anim 180
			{
				anim = Turrent_180,
				animate = FALSE,
			}

			anim 182
			{
				anim = Turrent_182,
				animate = FALSE,
			}

			anim 184
			{
				anim = Turrent_184,
				animate = FALSE,
			}

			anim 186
			{
				anim = Turrent_186,
				animate = FALSE,
			}

			anim 188
			{
				anim = Turrent_188,
				animate = FALSE,
			}

			anim 190
			{
				anim = Turrent_190,
				animate = FALSE,
			}

			anim 192
			{
				anim = Turrent_192,
				animate = FALSE,
			}

			anim 194
			{
				anim = Turrent_194,
				animate = FALSE,
			}

			anim 196
			{
				anim = Turrent_196,
				animate = FALSE,
			}

			anim 198
			{
				anim = Turrent_198,
				animate = FALSE,
			}

			anim 200
			{
				anim = Turrent_200,
				animate = FALSE,
			}

			anim 202
			{
				anim = Turrent_202,
				animate = FALSE,
			}

			anim 204
			{
				anim = Turrent_204,
				animate = FALSE,
			}

			anim 206
			{
				anim = Turrent_206,
				animate = FALSE,
			}

			anim 208
			{
				anim = Turrent_208,
				animate = FALSE,
			}

			anim 210
			{
				anim = Turrent_210,
				animate = FALSE,
			}

			anim 212
			{
				anim = Turrent_212,
				animate = FALSE,
			}

			anim 214
			{
				anim = Turrent_214,
				animate = FALSE,
			}

			anim 216
			{
				anim = Turrent_216,
				animate = FALSE,
			}

			anim 218
			{
				anim = Turrent_218,
				animate = FALSE,
			}

			anim 220
			{
				anim = Turrent_220,
				animate = FALSE,
			}

			anim 222
			{
				anim = Turrent_222,
				animate = FALSE,
			}

			anim 224
			{
				anim = Turrent_224,
				animate = FALSE,
			}

			anim 226
			{
				anim = Turrent_226,
				animate = FALSE,
			}

			anim 228
			{
				anim = Turrent_228,
				animate = FALSE,
			}

			anim 230
			{
				anim = Turrent_230,
				animate = FALSE,
			}

			anim 232
			{
				anim = Turrent_232,
				animate = FALSE,
			}

			anim 234
			{
				anim = Turrent_234,
				animate = FALSE,
			}

			anim 236
			{
				anim = Turrent_236,
				animate = FALSE,
			}

			anim 238
			{
				anim = Turrent_238,
				animate = FALSE,
			}

			anim 240
			{
				anim = Turrent_240,
				animate = FALSE,
			}

			anim 242
			{
				anim = Turrent_242,
				animate = FALSE,
			}

			anim 244
			{
				anim = Turrent_244,
				animate = FALSE,
			}

			anim 246
			{
				anim = Turrent_246,
				animate = FALSE,
			}

			anim 248
			{
				anim = Turrent_248,
				animate = FALSE,
			}

			anim 250
			{
				anim = Turrent_250,
				animate = FALSE,
			}

			anim 252
			{
				anim = Turrent_252,
				animate = FALSE,
			}

			anim 254
			{
				anim = Turrent_254,
				animate = FALSE,
			}

			anim 256
			{
				anim = Turrent_256,
				animate = FALSE,
			}

			anim 258
			{
				anim = Turrent_258,
				animate = FALSE,
			}

			anim 260
			{
				anim = Turrent_260,
				animate = FALSE,
			}

			anim 262
			{
				anim = Turrent_262,
				animate = FALSE,
			}

			anim 264
			{
				anim = Turrent_264,
				animate = FALSE,
			}

			anim 266
			{
				anim = Turrent_266,
				animate = FALSE,
			}

			anim 268
			{
				anim = Turrent_268,
				animate = FALSE,
			}

			anim 270
			{
				anim = Turrent_270,
				animate = FALSE,
			}

			anim 272
			{
				anim = Turrent_272,
				animate = FALSE,
			}

			anim 274
			{
				anim = Turrent_274,
				animate = FALSE,
			}

			anim 276
			{
				anim = Turrent_276,
				animate = FALSE,
			}

			anim 278
			{
				anim = Turrent_278,
				animate = FALSE,
			}

			anim 280
			{
				anim = Turrent_280,
				animate = FALSE,
			}

			anim 282
			{
				anim = Turrent_282,
				animate = FALSE,
			}

			anim 284
			{
				anim = Turrent_284,
				animate = FALSE,
			}

			anim 286
			{
				anim = Turrent_286,
				animate = FALSE,
			}

			anim 288
			{
				anim = Turrent_288,
				animate = FALSE,
			}

			anim 290
			{
				anim = Turrent_290,
				animate = FALSE,
			}

			anim 292
			{
				anim = Turrent_292,
				animate = FALSE,
			}

			anim 294
			{
				anim = Turrent_294,
				animate = FALSE,
			}

			anim 296
			{
				anim = Turrent_296,
				animate = FALSE,
			}

			anim 298
			{
				anim = Turrent_298,
				animate = FALSE,
			}

			anim 300
			{
				anim = Turrent_300,
				animate = FALSE,
			}

			anim 302
			{
				anim = Turrent_302,
				animate = FALSE,
			}

			anim 304
			{
				anim = Turrent_304,
				animate = FALSE,
			}

			anim 306
			{
				anim = Turrent_306,
				animate = FALSE,
			}

			anim 308
			{
				anim = Turrent_308,
				animate = FALSE,
			}

			anim 310
			{
				anim = Turrent_310,
				animate = FALSE,
			}

			anim 312
			{
				anim = Turrent_312,
				animate = FALSE,
			}

			anim 314
			{
				anim = Turrent_314,
				animate = FALSE,
			}

			anim 316
			{
				anim = Turrent_316,
				animate = FALSE,
			}

			anim 318
			{
				anim = Turrent_318,
				animate = FALSE,
			}

			anim 320
			{
				anim = Turrent_320,
				animate = FALSE,
			}

			anim 322
			{
				anim = Turrent_322,
				animate = FALSE,
			}

			anim 324
			{
				anim = Turrent_324,
				animate = FALSE,
			}

			anim 326
			{
				anim = Turrent_326,
				animate = FALSE,
			}

			anim 328
			{
				anim = Turrent_328,
				animate = FALSE,
			}

			anim 330
			{
				anim = Turrent_330,
				animate = FALSE,
			}

			anim 332
			{
				anim = Turrent_332,
				animate = FALSE,
			}

			anim 334
			{
				anim = Turrent_334,
				animate = FALSE,
			}

			anim 336
			{
				anim = Turrent_336,
				animate = FALSE,
			}

			anim 338
			{
				anim = Turrent_338,
				animate = FALSE,
			}

			anim 340
			{
				anim = Turrent_340,
				animate = FALSE,
			}

			anim 342
			{
				anim = Turrent_342,
				animate = FALSE,
			}

			anim 344
			{
				anim = Turrent_344,
				animate = FALSE,
			}

			anim 346
			{
				anim = Turrent_346,
				animate = FALSE,
			}

			anim 348
			{
				anim = Turrent_348,
				animate = FALSE,
			}

			anim 350
			{
				anim = Turrent_350,
				animate = FALSE,
			}

			anim 352
			{
				anim = Turrent_352,
				animate = FALSE,
			}

			anim 354
			{
				anim = Turrent_354,
				animate = FALSE,
			}

			anim 356
			{
				anim = Turrent_356,
				animate = FALSE,
			}

			anim 358
			{
				anim = Turrent_358,
				animate = FALSE,
			}

			lua
			{
				create = Vehicles.Create.TurrentA,
				init = Vehicles.Init.TurrentA,
				update = Vehicles.Update.TurrentA,
			}
		}
	}
}


